package com.pshcp.common.enums;

/**
 * @Description: 0成功 1失败
 * @Author: xiaoche
 * @Date: 2022/10/29 12:36
 */
public enum ReCallHisEnum {

    OK(0, "成功"),

    REFUND_FAIL(1, "退号失败"),

    ;

    private Integer code;
    private String desc;

    ReCallHisEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDescByCode(int code){
        for(ReCallHisEnum e : ReCallHisEnum.values()){
            if(e.getCode() == code){
                return e.getDesc();
            }
        }
        return null;
    }

}
